home *** CD-ROM | disk | FTP | other *** search
- Path: news.unt.edu!news
- From: Steve Fogoros <sfogoros@hsc.unt.edu>
- Newsgroups: comp.lang.c
- Subject: Re: Newbie doesn't understand compiler error
- Date: Fri, 01 Mar 1996 21:32:38 -0800
- Organization: University of North Texas Health Science Center
- Message-ID: <3137DD76.4EAE@hsc.unt.edu>
- References: <Pine.SUN.3.91.960301153010.11258B-100000@pioneer.uspto.gov> <31378ECB.3B81@oc.com>
- NNTP-Posting-Host: sfogoros.hsc.unt.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Larry Weiss wrote:
- >
- > Max Schubert wrote:
- > >
- > > ...
- > >
- > > main( int argv, char *argc[] ) <<- Compiler states "Syntax error at or near
- > > { word type char."
- > >
- > > Do I need to update my compiler?
- > >
- > > ANY help would be greatly appreciated.
- >
- > First off, you may have made a typo here, but the correct declaration of main() is
- >
- > main( int argc, char *argv[] ) ^ ^
- I agree that Max's illustration is probably a typo, and it is important to catch
- the error above as it would lead to extra debug time, but the identifiers can be any legal
- text. I wrote main( int c, char *v[]) once. Works fine, only it doesn't look like K&R.
- (I stopped doing it because it looks unnatural. Kind'a gave me the creeps.)
-
- --
- Steve Fogoros, Academic Information Coordinator
- University of North Texas Health Science Center
- sfogoros@hsc.unt.edu
-